package com.songxh.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

/**
 * Description:
 * Created by Administrator on 2017/8/24 16:57.
 */
@RestController
public class MainController {

    private static final Logger logger = LoggerFactory.getLogger(MainController.class);

    @RequestMapping("/")
    public Object index() {
        String uuid = UUID.randomUUID().toString();
        logger.info(">>> start process {}", uuid);
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            logger.info(">>> process {} interrupted", uuid);
            e.printStackTrace();
        }
        logger.info(">>> end process {}", uuid);
        Map<String, Object> result = new HashMap<>();
        result.put(">>> success", true);
        return result;
    }
    
}
